package com.ruoyi.binding.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.binding.mapper.MhGameCategoryMapper;
import com.ruoyi.binding.domain.MhGameCategory;
import com.ruoyi.binding.service.IMhGameCategoryService;

/**
 * 游戏类别信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-25
 */
@Service
public class MhGameCategoryServiceImpl implements IMhGameCategoryService {
    @Autowired
    private MhGameCategoryMapper mhGameCategoryMapper;

    /**
     * 查询游戏类别信息
     *
     * @param id 游戏类别信息主键
     * @return 游戏类别信息
     */
    @Override
    @DataScope(userAlias = "u", deptAlias = "d")
    public MhGameCategory selectMhGameCategoryById(Long id) {
        return mhGameCategoryMapper.selectMhGameCategoryById(id);
    }

    /**
     * 查询游戏类别信息
     *
     * @param categoryName 游戏类别信息主键
     * @return 游戏类别信息
     */
    @DataScope(userAlias = "u", deptAlias = "d")
    public MhGameCategory selectMhGameCategoryByCategoryName(String categoryName) {
        return mhGameCategoryMapper.selectMhGameCategoryByCategoryName(categoryName);
    }

    /**
     * 查询游戏类别信息列表
     *
     * @param mhGameCategory 游戏类别信息
     * @return 游戏类别信息
     */
    @Override
    @DataScope(userAlias = "u", deptAlias = "d")
    public List<MhGameCategory> selectMhGameCategoryList(MhGameCategory mhGameCategory) {
        return mhGameCategoryMapper.selectMhGameCategoryList(mhGameCategory);
    }

    /**
     * 新增游戏类别信息
     *
     * @param mhGameCategory 游戏类别信息
     * @return 结果
     */
    @Override
    public int insertMhGameCategory(MhGameCategory mhGameCategory) {
        return mhGameCategoryMapper.insertMhGameCategory(mhGameCategory);
    }

    /**
     * 修改游戏类别信息
     *
     * @param mhGameCategory 游戏类别信息
     * @return 结果
     */
    @Override
    public int updateMhGameCategory(MhGameCategory mhGameCategory) {
        return mhGameCategoryMapper.updateMhGameCategory(mhGameCategory);
    }

    /**
     * 批量删除游戏类别信息
     *
     * @param ids 需要删除的游戏类别信息主键
     * @return 结果
     */
    @Override
    public int deleteMhGameCategoryByIds(Long[] ids) {
        return mhGameCategoryMapper.deleteMhGameCategoryByIds(ids);
    }

    /**
     * 删除游戏类别信息信息
     *
     * @param id 游戏类别信息主键
     * @return 结果
     */
    @Override
    public int deleteMhGameCategoryById(Long id) {
        return mhGameCategoryMapper.deleteMhGameCategoryById(id);
    }
}
